package org.youshang.controller;

import org.example.annotation.ProducerKafkaMessage;
import org.springframework.http.ResponseEntity;
import org.youshang.entity.Student;
import org.youshang.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author youshang
 * @date 2021/02/09 11:36
 **/
@RestController
@RequestMapping("/hello")
public class HelloController   {

    @Autowired
    private HelloService helloService;


    @RequestMapping("/")
    public ResponseEntity hello(String record){
        Student student = helloService.hello(record);
        System.out.println("HelloController  : "+student.toString());
        return ResponseEntity.ok(student);
    }
}
